#!/usr/local/bin/python3
# -*- coding: utf-8 -*-

"""
@File    : language.py
@Author  : different && 道阻且长,行则将至 行而不辍,未来可期
@Time    : 2021/9/29 15:48
@Desc    :

"""
from django.utils.deprecation import MiddlewareMixin


class LanguageMiddleware(MiddlewareMixin):
    def process_request(self, request):
        if not request.session.get('language'):
            request.session['language'] = 'zh_CN'
